namespace CShipBasic.oop;

public class Programmer:Employee
{
    public float bonus = 10000;
    public int age = 20;

    public void Drink()
    {
        Console.WriteLine("喝的什么水？");
    }

    /// <summary>
    /// 重写了父类的方法
    /// </summary>
    /// <param name="isEat"></param>
    public override void Eat(bool isEat)
    {
        if (isEat)
        {
            Console.WriteLine("我是Programmer，今天准备一起去吃饭");
        }
        else
        {
            Console.WriteLine("我是Programmer，不饿，今天不去吃饭了");
        }
    }

    public void testCallBaseFunction(bool isEat)
    {
        base.Eat(isEat);
        Console.WriteLine("从父类获取的年龄为：{0}",base.age);
    }
}